home *** CD-ROM | disk | FTP | other *** search
- diff -Bbur zlib-1.1.3/Makefile palmzlib/Makefile
- --- zlib-1.1.3/Makefile Thu Jul 9 12:07:18 1998
- +++ palmzlib/Makefile Tue Mar 28 13:45:21 2000
- @@ -12,9 +12,9 @@
- # To install in $HOME instead of /usr/local, use:
- # make install prefix=$HOME
-
- -CC=cc
- -
- -CFLAGS=-O
- +CC=m68k-palmos-coff-gcc
- +#For Pilot - Leave MAX_WBITS=15 for inflate, but lower for deflate in call
- +CFLAGS=-g -O3 -DPILOT -DMAXSEG_64K
- #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
- #CFLAGS=-g -DDEBUG
- #CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
- @@ -28,8 +28,8 @@
- LIBS=libz.a
- SHAREDLIB=libz.so
-
- -AR=ar rc
- -RANLIB=ranlib
- +AR=m68k-palmos-coff-ar rc
- +RANLIB=m68k-palmos-coff-ranlib
- TAR=tar
- SHELL=/bin/sh
-
- @@ -38,7 +38,7 @@
- libdir = ${exec_prefix}/lib
- includedir = ${prefix}/include
-
- -OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
- +OBJS = adler32.o compress.o crc32.o uncompr.o deflate.o trees.o \
- zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o
-
- OBJA =
- @@ -57,7 +57,7 @@
- contrib/minizip/[CM]*[pe] contrib/minizip/*.[ch] contrib/minizip/*.[td]?? \
- contrib/delphi*/*.???
-
- -all: example minigzip
- +all: ZLib.prc libz.sa
-
- test: all
- @LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \
- @@ -152,6 +152,31 @@
- depend:
- makedepend -- $(CFLAGS) -- *.[ch]
-
- +ZLib.prc: GLib0000.ZLib.grc data0000.ZLib.grc rloc0000.ZLib.grc
- + build-prc -l ZLib.prc "Z Library" ZLib GLib0000.ZLib.grc \
- + data0000.ZLib.grc rloc0000.ZLib.grc
- +
- +GLib0000.ZLib.grc: ZLib
- + m68k-palmos-coff-obj-res -l ZLib
- +
- +data0000.ZLib.grc: GLib0000.ZLib.grc
- +
- +rloc0000.ZLib.grc: GLib0000.ZLib.grc
- +
- +ZLib: ZLib.S libz.a
- + $(CC) -shared -o ZLib ZLib.S libz.a
- +
- +libz.sa: Zstub.o
- + $(AR) rcs $@ $<
- +
- +Zstub.c: ZLib.S
- +
- +ZLib.S: Z.exp
- + m68k-palmos-coff-stubgen "Z Library" ZLib Zstub.c ZLib.S < $<
- +
- +Z.exp: libz.a
- + m68k-palmos-coff-exportlist $< > Z.exp
- +
- # DO NOT DELETE THIS LINE -- make depend depends on it.
-
- adler32.o: zlib.h zconf.h
- diff -Bbur zlib-1.1.3/zconf.h palmzlib/zconf.h
- --- zlib-1.1.3/zconf.h Wed Jul 8 13:55:27 1998
- +++ palmzlib/zconf.h Mon Aug 24 17:48:27 1998
- @@ -276,4 +276,14 @@
- # pragma map(inflate_trees_free,"INTRFR")
- #endif
-
- +#ifdef PILOT
- +#pragma pack(2)
- +#undef Byte
- +#include <System/SysAll.h>
- +#include <System/Unix/unix_stdlib.h>
- +#include <System/Unix/unix_string.h>
- +#undef STDC
- +#define HAVE_MEMCPY
- +#endif
- +
- #endif /* _ZCONF_H */
- diff -Bbur zlib-1.1.3/zutil.c palmzlib/zutil.c
- --- zlib-1.1.3/zutil.c Wed Jul 8 13:01:47 1998
- +++ palmzlib/zutil.c Mon Aug 24 17:49:51 1998
- @@ -210,8 +210,15 @@
- unsigned items;
- unsigned size;
- {
- +#ifndef PILOT
- if (opaque) items += size - size; /* make compiler happy */
- return (voidpf)calloc(items, size);
- +#else
- + voidpf x;
- + x = malloc(items*size);
- + memset(x,0,items*size);
- + return x;
- +#endif
- }
-
- void zcfree (opaque, ptr)
-